#include "log.hpp"



void LogToScreen()
{
    log log1;
    log1(Info,"this is a Info message test");
    log1(Error,"this is a Error message test");
    log1(Waring,"this is a Info Waring test");
    log1(Fatel,"this is a Fatel message test");
    log1(Debug,"this is a Fatel Debug test");
}

void LogToOneFile()
{
    log log1(OneFile);
    log1(Info,"this is a Info message test");
    log1(Error,"this is a Error message test");
    log1(Waring,"this is a Info Waring test");
    log1(Fatel,"this is a Fatel message test");
    log1(Debug,"this is a Fatel Debug test");
}

void LogToClassFile()
{
    log log1(ClassFile);
    log1(Info,"this is a Info message test");
    log1(Error,"this is a Error message test");
    log1(Waring,"this is a Info Waring test");
    log1(Fatel,"this is a Fatel message test");
    log1(Debug,"this is a Fatel Debug test");
}


void logtest()
{
    while(1)
    {
        int tmp;
        cout<<"please enter nums ,1 Print to Screen ,2 Print to OneFile,3 Print to ClassFile,0 to exit"<<endl;
        cin>>tmp;
        switch (tmp)
        {
        case(1):
            LogToScreen();
            break;
        case(2):
            LogToOneFile();
            break;
        case(3):
            LogToClassFile();
            break;
        case(0):
            cout<<"test end!!!"<<endl;
            return;
        default:
            cout<<"enter error!!!"<<endl;
            break;
        }
    }
}


int main()
{
    logtest();
    return 0;
}